package com.app.mymvp.business.search;

import android.content.Context;

/**
 * Created by ${Bi} on 2016/10/13 11:13.
 */

public class SearchPresenter extends SearchContract.Presenter {
    @Override
    void initDatebase(Context context) {
        model.initDatebase(context);
    }

    @Override
    void search(String tempName) {
        view.showResult(model.queryData(tempName));
    }

    @Override
    void deleteData() {
        model.deleteData();
    }

    @Override
    void deleteOneData(String historyName) {
        model.deleteOneData(historyName);
    }

    @Override
    void insertData(String tempName) {
        model.insertData(tempName);
    }

    @Override
    boolean hasData(String tempName) {
        return model.hasData(tempName);
    }
}
